﻿@model IfSoft.OA.Entities.BankBill

<script type="text/javascript">  
    $(function () {
        $('#Amount').keyup(function (e) {
            var keyCode = event.keyCode;
            var realkey = String.fromCharCode(keyCode).toUpperCase();            
            var num = $('#Amount').val();
            $('#AmountInCN').val(Arabia_to_Chinese(num));
            //event.returnValue = false;
        });
    });
</script>

<div class="text-right">    
 @Html.ActionLink("返回", "Index")
</div>
    
<table class="edit-table">
    <tr>
        <th>日期 <span class="required">*</span></th>
        <td>
            @Html.TextBoxFor(model => model.PayDate, new { @class = "datepicker" })
            @Html.ValidationMessageFor(model => model.PayDate)
        </td>
        <th></th>
        <td>             
        </td>
    </tr>
    <tr>
        <th>付款公司 <span class="required">*</span></th>
        <td>
            @Html.EditorFor(model => model.PayCompany)
             <a href="/Waiting" target="_blank">选择</a>
            @Html.ValidationMessageFor(model => model.PayCompany)
        </td>
        <th>部门</th>
        <td>
              @Html.EditorFor(model => model.PayDepartment)
            @Html.ValidationMessageFor(model => model.PayDepartment)
        </td>
    </tr>
    <tr>
        <th>付款方式</th>
        <td>
            @Html.DropDownList("PayType", ViewBag.PayTypes as SelectList)
            @Html.ValidationMessageFor(model => model.PayType)
        </td>
        <th>付款银行</th>
        <td>
            @Html.EditorFor(model => model.PayBank)
            @Html.ValidationMessageFor(model => model.PayBank)
        </td>
    </tr>

    <tr>    
        <th>金额小写 <span class="required">*</span></th>
        <td>
            @Html.EditorFor(model => model.Amount)
            @Html.ValidationMessageFor(model => model.Amount)
        </td>
        <th>金额大写</th>
        <td>@Html.EditorFor(model => model.AmountInCN)</td>
    </tr>
    <tr>    
        <th>货币类别</th>
        <td>
            @Html.DropDownList("Currency", ViewBag.Currencies as SelectList)
            @Html.ValidationMessageFor(model => model.Currency)
        </td>
        <th>最后付款日期</th>
        <td>
            @Html.TextBoxFor(model => model.Deadline, new { @class="datepicker"})
            @Html.ValidationMessageFor(model => model.Deadline)
        </td>
    </tr>

    <tr>        
        <th>付款凭证</th>
        <td>
            @Html.DropDownList("PayNoteType", ViewBag.PayNoteTypes as SelectList)
            @Html.ValidationMessageFor(model => model.PayNoteType)
        </td>
        <th>票据号码</th>
        <td>
            @Html.EditorFor(model => model.PayNoteNo)
            @Html.ValidationMessageFor(model => model.PayNoteNo)
        </td>
    </tr>

    <tr>    
        <th>收款公司 <span class="required">*</span></th>
        <td>
            @Html.EditorFor(model => model.ReceiveCompany)
            <a href="/Waiting" target="_blank">选择</a>
            @Html.ValidationMessageFor(model => model.ReceiveCompany)
        </td>
        <th></th>
        <td></td>
    </tr>
    <tr>    
        <th>收款银行</th>
        <td>
            @Html.EditorFor(model => model.ReceiveBank)
             <a href="/Waiting" target="_blank">选择</a>
            @Html.ValidationMessageFor(model => model.ReceiveBank)
        </td>
        <th>收款帐号</th>
        <td>
            @Html.EditorFor(model => model.ReceiveAccountNo)
            @Html.ValidationMessageFor(model => model.ReceiveAccountNo)
        </td>
    </tr>
    <tr><td colspan="4">付款内容及用途 [正式版可以添加任意多行, 并提供自动到期提醒功能]</td></tr>
    <tr>        
        <td colspan="4">@Html.Partial("_CreateOrEditDetails", Model)</td>
    </tr>
    <tr>
        <td colspan="4" class="text-right"><input type="submit" value="保存" /></td>
    </tr>
</table>
